[PHP & TCPDF] How to center html table?

Posted by user198003 on Stack Overflow See other posts from Stack Overflow or by user198003
Published on 2010-04-09T16:10:04Z Indexed on 2010/04/09 16:13 UTC
Read the original article Hit count: 780

Filed under:
|

Trying to create proper PDF document, using PHP and TCPDF.

Can you help me, how can I use writeHTML function to create and center table, in TCPDF?

Tryed with:

 $html = '

 <div style="margin-left: auto; margin-right: auto; width: 50%">
  <table border="1" width="200" align="center"><tr><td><b>Invoice number: '.$this->xInvoiceNumber.'</b></td></tr></table>
  <br />
  <table border="1" width="200" align="center"><tr><td>'.$this->xClient.'</td></tr></table>
  <br />
 </div>

... but no luck.

© Stack Overflow or respective owner

Related posts about php

Related posts about tcpdf